import java.util.Arrays;

/**
 * Created by 14229 on 2020/2/19.
 */
public class Test10 {
    public static void main(String[] args) {
        int[] arr = {11,21,5,12,7,14};
        int[] interchange = interchange(arr);
        System.out.println(Arrays.toString(interchange));

    }
    public static int[]  interchange (int[] arr){
        int a = arr[0];
        arr[0] = arr[arr.length-1];
        arr[arr.length-1] = a;
        return arr;
    }
}
